The directional control valve capable of detecting the changeover operation of a spool utilizing a magnet is well known as disclosed in, for example, Japanese Unexamined Utility Model Publication No. 2-66784. This known directional control valve is provided with a magnet on the outer periphery of a spool and provided with a magnet sensor on a casing. This directional control valve is arranged so that, when the spool moves to one changeover position, the magnet approaches the magnetic sensor, and the magnetic sensor is turned on, and that, when the spool moves to the other changeover position, the magnet moves away from the magnetic sensor, and the magnetic sensor is turned off. Thus, this directional control valve detects that the spool has been changed over by one on/off of the magnetic sensor.
However, since the above-described conventional directional control valve uses the method in which a magnetic sensor outputs the detection signal of "on" or "off" when the spool have arrived at a spool end, this directional control valve can not detect positions of the spool on the way of a stroke, even though it can detect the position of the spool situated at a stroke end. Therefore, even if the spool makes an irregular movement deficient in smoothness due to some abnormality on the way of a stroke, it is impossible to detect this abnormality. This has made it difficult to take suitable precautions against a failure or an accident before they happen, and has thus raised a problem in the maintenance and management.
In addition, the above-described magnetic sensor is generally constituted so as to be turned on when the magnetic flux density is above a fixed value, and to be turned off when it is below another fixed value. Therefore, during the driving stroke of the spool, if the magnetic flux density becomes higher than the fixed value due to the approach of a magnet, the magnetic sensor is turned on even before the spool arrives at a stroke end, and conversely, during the return stroke of the spool, if the magnetic flux density becomes lower than the other fixed value due to the moving-away of the magnet, the magnetic sensor is turned off even before the spool arrives at the return-stroke end. Therefore, even if the magnetic sensor stops on the spot for some reason at the instant when the magnetic sensor is turned on or turned off, the magnetic sensor only outputs an on/off signal noticing that the spool has been completely changed over. Thus, any abnormality can not be detected.
Furthermore, since the above-described conventional directional control valve installs the magnet at a position situated in the fluid passage on the outer periphery of the spool, the magnet directly contacts a hydraulic fluid. Therefore, if the fluid contains water, chemical mist, particulates of magnetic material such as metallic powder, or the like, there would arise the problem that the contact of the magnet with these substances makes the magnet rust, corrode, or adsorb the particulates, thereby causing the reduction in detection accuracy due to the decrease in magnetic force, or incurring a malfunction of the valve member due to adsorbed particulates.